import { createApp } from 'vue';
import { Base64 } from 'js-base64';
import App from './App.vue';
import router from './router';
import store from './store';
import '@/assets/css/global.css';
import '@/assets/css/animationmes.css';
import Util from "@/gamejs/Util";
import MEventCMD from "@/gamejs/MEventCMD";
import winApp from "@/gamejs/winApp";
import $ from 'jquery';
import NetWrok from "@/gamejs/NetWrok";
import vConsole from 'vconsole';



window.Util=Util;
window.MEventCMD=MEventCMD;
window.$=$;
window.winApp =new winApp();
window.NetWrok=new NetWrok();
window.$Base64=Base64;
//createApp(App).use(store).use(router).use(new vConsole()).mount('#app');
createApp(App).use(store).use(router).mount('#app');

/*****************************************以下是手机适配****/
(function(doc,win){let windSize=100;console.log('adaptionApp 手机适配',windSize);var docEl=doc.documentElement,resizeEvt='orientationchange'in window?'orientationchange':'resize',recalc=function(){var clientWidth=docEl.clientWidth;if(!clientWidth)return;windSize=100*(clientWidth/750);docEl.style.fontSize=100*(clientWidth/750)+'px'};recalc();if(!doc.addEventListener)return;win.addEventListener(resizeEvt,recalc,false);doc.addEventListener('DOMContentLoaded',recalc,false);(function(){return;var dpr=scale=1;var isIPhone=win.navigator.appVersion.match(/iphone/gi);var devicePixelRatio=win.devicePixelRatio;if(isIPhone){if(devicePixelRatio>=3&&(!dpr||dpr>=3)){dpr=3}else if(devicePixelRatio>=2&&(!dpr||dpr>=2)){dpr=2}else{dpr=1}}else{dpr=1}scale=1/dpr;var metaEl="";metaEl=doc.createElement('meta');metaEl.setAttribute('name','viewport');metaEl.setAttribute('content','initial-scale='+scale+', maximum-scale='+scale+', minimum-scale='+scale+', user-scalable=no');if(docEl.firstElementChild){docEl.firstElementChild.appendChild(metaEl)}else{var wrap=doc.createElement('div');wrap.appendChild(metaEl);doc.write(wrap.innerHTML)}})();window._windSize=windSize;console.log('adaptionApp 手机适配',windSize);})(document,window);

